* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  touch-action: manipulation;
}

body {
  background: #f0e6d3;
  overflow: hidden;
  -webkit-text-size-adjust: 100%;
  position: fixed;
}

.editor-container {
  writing-mode: vertical-rl;
  height: 100vh;
  width: 100vw;
  padding: 2rem 1rem;
  font-size: 1.2rem;
  line-height: 2;
  color: #3d2e1e;
  overflow-x: auto;/* 水平滚动容器 */
  letter-spacing: 0.1em;
  scroll-behavior: smooth;
  overflow-x: scroll;
  white-space: normal;
  -webkit-overflow-scrolling: touch;
}

.control-left {
  width: 40px;
  height: 40px;
  position: absolute;
  top: 1rem;
  left: 0.5rem;/* 改为左侧定位 */
  writing-mode: horizontal-tb;
  z-index: 10;
  margin-left: 16px;
}

.back-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  position: absolute;
  writing-mode: horizontal-tb;/* 强制按钮水平排列 */
  z-index: 10;
  display: flex;
  gap: 0.5rem;
  background: #f5f0e6 url('../resource/media/chevron_left.svg') no-repeat center;
}

.tool-buttons {
  position: absolute;
  top: 1rem;
  right: 1rem;
  writing-mode: horizontal-tb;/* 强制按钮水平排列 */
  z-index: 10;
  display: flex;
  gap: 0.5rem;
}

.tool-button {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  padding: 0.5rem 1rem;
  background: #f5f0e6;
  border: 1px solid #c4a87d;
  cursor: pointer;
  color: #3d2e1e;
  transition: all 0.2s;
}

.redo {
  background: #f5f0e6 url('../resource/media/redo.svg') no-repeat center;
}

.undo {
  background: #f5f0e6 url('../resource/media/undo.svg') no-repeat center;
}

.save {
  background: #f5f0e6 url('../resource/media/save.svg') no-repeat center;
}

.editor-content {
  min-height: 80%;
  outline: none;
  border-right: 1px solid #c4a87d;
  padding-right: 1rem;
  display: inline-block;/* 关键：使内容横向扩展 */
  width: auto;
  margin-top: 3em;
  text-orientation: upright;
  word-wrap: break-word;
  word-break: break-all;
}

/* 段落间距 */

.editor-content p {
  margin: 0 0 0 0;
}

@media (max-width: 480px) {
  .editor-container {
    font-size: 1rem;
    padding: 1rem 0.5rem;
  }
}

/* 隐藏滚动条但保留滚动功能 */
::-webkit-scrollbar {
  width: 0;
  height: 0;
}

.annotation-button {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
